package com.db.patterns.proxy.static_proxy;

import com.db.patterns.proxy.jdk_proxy.ShowLove;

public class Proxy implements ShowLove {

    private final Student student;

    public Proxy(Student student) {
        this.student = student;
    }

    @Override
    public void sendFlowers() {
        System.out.println("戴理收取一点好处费");
        student.sendFlowers();
    }

    @Override
    public void sendToys() {
        System.out.println("戴理收取一点好处费");
        student.sendToys();
    }
}
